package cloud.xlh.covert;


import cloud.xlh.domin.dto.BaseDTO;
import cloud.xlh.utils.SpringUtil;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/1/7 22:57
 * @ Description:
 */
public interface DTOToVOCovert<T extends BaseDTO> {
    default Object covert(T dto , Class<? extends DTOToVOCovert> aClass) {
        DTOToVOCovert dtoToVOCovert = null;
        dtoToVOCovert = SpringUtil.getBean(aClass);
        return dtoToVOCovert.doCovert(dto);
    }

    public Object doCovert(T dto);
}
